package com.zjs.entity.sql;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sql_ticket")
@ApiModel(value = "Ticket对象", description = "门票表")
public class Ticket implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("门票ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("所属景点ID")
    private Integer spotId;

    @ApiModelProperty("门票类型")
    private String ticketType;

    @ApiModelProperty("门票价格")
    private BigDecimal ticketPrice;

    @ApiModelProperty("门票描述")
    private String ticketDescription;

    @ApiModelProperty("门票有效期（天）")
    private Integer ticketValidityDays;

    @ApiModelProperty("购买限制")
    private Integer purchaseLimit;

    @ApiModelProperty("开始日期")
    private LocalDate startDate;

    @ApiModelProperty("结束日期")
    private LocalDate endDate;

    @ApiModelProperty("是否可退款")
    private Boolean isRefundable;

    @ApiModelProperty("退款政策")
    private String refundPolicy;

    @ApiModelProperty("折扣率")
    private Float discountRate;

    @ApiModelProperty("已售数量")
    private Integer numOfSold;

    @ApiModelProperty("剩余数量")
    private Integer numOfRemaining;

    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty("更新时间")
    private LocalDateTime updatedAt;
}
